package com.shareit.ocr.domain.template;

import com.shareit.ocr.util.InvoiceQueryUtil;

/**
* 附有字段说明的字段类型
*  
* @author geai
* @date 2018年1月19日  新建  
*/
public class InvoiceDataField {
	
	private String name;
	
	private String comment;
	
	private String value;

	
	public InvoiceDataField(String name) {
		super();
		this.name = name;
		this.comment = InvoiceQueryUtil.getComment(name);
		this.value = "";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public InvoiceDataField copy() {
		
		InvoiceDataField field = new InvoiceDataField(this.name);
		field.setValue(this.value);
		return field;
	}

	@Override
	public String toString() {
		return "{" +
				"name='" + name + '\'' +
				", comment='" + comment + '\'' +
				", value='" + value + '\'' +
				'}';
	}
}
